<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>编辑人员参加项目信息</title>
   <%@include file="/view/resource.jsp" %>
    <meta charset="utf-8">
  </head>
  <body>
           <div id="addPerson" style="width:500px;height:450px;">
            <form action="<%=request.getContextPath()%>/tostpjteamdetail/edit.do" method="post" name="addPerson" id="personAdd" target="ifm">
          	<input type="hidden" value="${teamperson.id }" name="id" id="id">
          	<input type="hidden" value="${teamperson.pjId }" name="pjId" id="pjId">
          	<input type="hidden" value="${teamperson.hdpId }" name="hdpId" id="hdpId">
           
           <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>人员:</span>&nbsp;&nbsp;   
            ${teamperson.hrName }(${teamperson.hdpName })
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <span>岗位名称:</span>   ${teamperson.hpoName }
            <br/><br/>
            &nbsp;&nbsp;<span>加入时间:</span>
            <input  id="ptmEntertime" class="easyui-datebox"  value="${teamperson.ptmEntertime }"  data-options="required:true"  name="ptmEntertime" style="width:150px; border: 1px solid #ccc"> &nbsp;&nbsp;&nbsp;&nbsp;  
         <span>离开时间:</span>    
            <input  id="ptmLeavetime" class="easyui-datebox" value="${teamperson.ptmLeavetime }" name="ptmLeavetime" style="width:150px; border: 1px solid #ccc">&nbsp;&nbsp;&nbsp;&nbsp;<br><br> &nbsp;&nbsp;
          <span>当前状态:</span>  
           <select  id="ptmStatus" class="easyui-combobox"  name="ptmStatus"  style="width:150px; border: 1px solid #ccc"> </select>
          <span>项目服务天数:</span>   
            <input  id="ptmServerday" class="easyui-validatebox" data-options="required:false" value="${teamperson.ptmServerday }"  name="ptmServerday"    style="width:125px; border: 1px solid #ccc"> <br><br>&nbsp;&nbsp;   
           <span>项目在职月份数:</span>  
            <input  id="ptmMonth" class="easyui-validatebox" data-options="required:false"  name="ptmMonth"  value="${teamperson.ptmMonth }" style="width:125px; border: 1px solid #ccc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   
          <span>加入次数:</span> 
            <input  id="ptmNumber" class="easyui-numberbox" missingMessage="请输入数字" data-options="required:false" name="ptmNumber" value="${teamperson.ptmNumber }" style="width:150px; border: 1px solid #ccc"><br><br> &nbsp;&nbsp;  
           <br>
         <input  type="button"  value="保存" onclick="veriFication()" >
         <input  type="button"  value="取消" onclick="window.close()" >
           </form>
            <iframe id='ifm' name='ifm' style="visibility:hidden;display:none"></iframe>
        </div>
 <script type="text/javascript">
$(function() {
var stat='${teamperson.ptmStatus}';
	//查询当前状态
     	$("#ptmStatus").combobox({
		url:urls['msUrl']+"/tostPjLookDetailsinfo/querynowstat.do",
		cache: false,  // queryPhoname
	    panelHeight: 'auto',//自动高度适合
		dataType:'json',
		valueField:'paValue',
		textField:'paName',
		multiple:false,
		formatter:function(result){
		   		var s= "<span> <input type='hidden' class='selectId' style='vertical-align: middle' id='selectId_"+result.id+"' value='"+result.paName+"'>"+result.paName+"</span>";
	   	   		return s;
	   	},
	   	onSelect:function(result){
	   		$("#selectId_"+result.paValue).attr("checked", true);
	   	},
	   	onUnselect:function(result){
	   		$("#selectId_"+result.paValue).attr("checked", false);
	   	},
	   	onLoadSuccess:function(){
			$("#ptmStatus").combobox('select',stat);
		}
	});
	});
	function veriFication(){
	   var  str = /^[0-9]*$/;
	   var yptmServerday = $("#ptmServerday").val();
	   var yptmServerday = $("#ptmServerday").val();
	   var yptmNumbery = $("#ptmNumber").val();
	   var s = yptmServerday.match(str);
	   var r = yptmServerday.match(str);
	   var c = yptmServerday.match(str);
	   if(s == null || r==null || c==null){
	     alert("请输入数字");
	   }
	   else {
	   document.getElementById("personAdd").submit();
	   alert("更新成功");
	   window.opener.location.reload();  
       window.close();
	   }
	}
	
 </script>
 
             
  </body>
</html>
